package org.wzy.xmlg_backend.dto;

import lombok.Data;
import java.time.LocalDateTime;

@Data
public class AnnouncementDTO {
    private Integer id;
    private String title;
    private String content;
    private Integer status; // 0-草稿 1-已发布
    private String statusText; // 状态文本
    private Integer publisherId;
    private String publisherName; // 发布人姓名
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    
    public String getStatusText() {
        return status != null ? (status == 1 ? "已发布" : "草稿") : "未知";
    }
}